<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>创建进入聊天室</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .error_msg {
            position: relative;
            margin-left: 35px;
            color: red;
        }
    </style>
</head>
<body>

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
    创建进入聊天室
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">创建进入聊天室</h4>
                <h4>密码必须是数字且大于等于6位</h4>
            </div>
            <form action="{% url 'transition' username=request.chart_web.user.username %}" method="post" novalidate>
                <div class="modal-body">
                    {% csrf_token %}
                    <input type="text" name="group" id="id_group">
                    <span class="error_msg">{{ error.group.0 }}</span>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
{#                    <button type="button" class="btn btn-primary">进入</button>#}
                    <input type="submit" class="btn btn-primary">
                </div>

            </form>
        </div>
    </div>
</div>


<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
</body>

</html>